<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">

<section class="content-header">
    <h1>各生产厂图纸签收明细</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm" onsubmit="return false;">
                        <input type="hidden" name="id" th:value="${ttid}">
                        <div class="row">
                            <div class="form-inline">
                                <div class="form-group">
                                    <label for="query-proCode">项目编号</label>
                                    <input id="query-proCode" type="text" name="proCode" class="form-control"
                                           placeholder="请输入项目编号">
                                </div>
                                <div class="form-group">
                                    <label for="query-proName">项目名称</label>
                                    <input id="query-proName" type="text" name="proName" class="form-control"
                                           placeholder="请输入项目名称">
                                </div>
                                <div class="form-group">
                                    <label for="query-malType">类型</label>
                                    <select id="query-malType" class="form-control" name="special">
                                        <option value="" selected>请选择</option>
                                        <option th:each="type : ${special}" th:value="${type.name}"
                                                th:text="${type.name}"></option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="query-part">部分</label>
                                    <input id="query-part" type="text" name="part" class="form-control"
                                           placeholder="请输入部分">
                                </div>

                                <div class="form-group">
                                    <label for="query-designer">设计者</label>
                                    <input id="query-designer" type="text" name="designer" class="form-control"
                                           placeholder="请输入设计者">
                                </div>

                                <div class="form-group">
                                    <label for="query-productionSignStatus">生产厂签收状态</label>
                                    <select id="query-productionSignStatus" class="form-control" name="signStatus">
                                        <option value="" selected>请选择</option>
                                        <option value="0">未签收</option>
                                        <option value="1">已签收</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="query-sectionName">生产厂签收状态</label>
                                    <input id="query-sectionName" type="text" name="sectionName" class="form-control"
                                           placeholder="请输入生产厂">
                                </div>
                                <button type="button" class="btn btn-success" id="btn-search"
                                        onclick="js.table.search(table)">
                                    <span class="Bold">搜索</span>
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">

    let table,table2;


    /** 就绪函数初始化*/
    $(function () {
        /** 加载列表 */
        table = js.table.init({
            url: ctx + "tecdrawcjsign/list",
            showExport: true,
            uniqueId: 'id',
            columns: [
                {
                    title: '序号', field: 'id', width: '50',
                    formatter: function (value, row, index) {
                        return index + 1;
                    }
                },
                {title: "项目编号", field: 'proCode'},
                {title: "项目名称", field: 'proName'},
                {title: "类型", field: 'special'},
                {title: "部分", field: 'part'},
                {title: "设计者", field: 'designer'},
                {title: "图纸<br>页数", field: 'drawPages'},
                {title: "制作件<br>清单<br>页数", field: 'makePages'},
                {title: "备注", field: 'remark'},
                {title: "生产签收时间", field: 'productionSignTime'},
                {title: "生产厂", field: 'sectionName'},
                {title: "生产厂签收人", field: 'signName'},
                {title: "生产厂签收时间", field: 'signTime'},
                {title: "签收状态", field: 'signStatus',
                    formatter: function (value) {
                        if (value === 0) {
                            return '<span class="badge label-inverse">未签收</span>';
                        } else if (value === 1) {
                            return '<span class="badge label-warning">已签收</span>';
                        }
                    }
                },

            ]
        });
    });

</script>
</body>
</html>
